<?php
/** *********************************************** * MyCodeIsYourCode * * @author  Jonnie Spratley * @date 2009 * @licence MCIYC * @website http://jonniespratley.com * @contact jonniespratley@gmail.com *********************************************** */
class TableStatus
{
	public $aName;
	public $aEngine;
	public $aVersion;
	public $aRow_format;
	public $aRows;
	public $aRow_length;
	public $aData_length;
	public $aIndex_length;
	public $aMaxData_length;
	public $aData_free;
	public $aCreated;
	public $aUpdated;
	public $aChecked;
	public $aOptions;
	public $aAutoIncrement;
	public $aComment;
	public $aDatabase = "";
	public $isView;
	
	public $aColumns;
	public function __construct( $database = null, $table, $columns )
	{
		if ( $database )
			$this->aDatabase = $database;
		
		if ( $table['Name'] )
			$this->aName = $table['Name'];
		
		if ( $table['Name'] )
			$this->aEngine = $table['Engine'];
		
		if ( $table['Version'] )
			$this->aVersion = $table['Version'];
		
		if ( $table['Row_format'] )
			$this->aRow_format = $table['Row_format'];
		
		if ( $table['Rows'] )
			$this->aRows = $table['Rows'];
		
		if ( $table['Avg_row_length'] )
			$this->aRow_length = $table['Avg_row_length'];
			
		if ( $table['Data_length'] )
			$this->aData_length = $table['Data_length'];
			
		if ( $table['Max_data_length'] )
			$this->aMaxData_length = $table['Max_data_length'];
			
		if ( $table['Index_length'] )
			$this->aIndex_length = $table['Index_length'];
			
		if ( $table['Data_free'] )
			$this->aData_free = $table['Data_free'];
			
		if ( $table['Create_time'] )
			$this->aCreated = $table['Create_time'];
			
		if ( $table['Auto_increment'] )
			$this->aAutoIncrement = $table['Auto_increment'];
			
		if ( $table['Update_time'] )
			$this->aUpdated = $table['Update_time'];
			
		if ( $table['Check_time'] )
			$this->aChecked = $table['Check_time'];
		
		if ( $table['Create_options'] )
			$this->aOptions = $table['Create_options'];
			
		if ( $table['Comment'] )
			$this->aComment = $table['Comment'];
			
		//if ( $table['View'] )
			//$this->isView = $table['View'];
	
			$this->aColumns = $columns;
	}
}
?>